        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>Features class / box2d_html Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d_html" data-type="Features">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d_html.html">box2d_html</a> &rsaquo; <a href="../box2d_html/Features.html">Features</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>Features</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<p>The features that intersect to form the contact point</p>
<pre class="source">
class Features {
  /** The edge that defines the outward contact normal. */
  int referenceEdge;

  /** The edge most anti-parallel to the reference edge. */
  int incidentEdge;

  /** The vertex (0 or 1) on the incident edge that was clipped. */
  int incidentVertex;

  /** A value of 1 indicates that the reference edge is on shape2. */
  int flip;

  /**
   * Constructs a new features with zero values for all fields.
   */
  Features() :
    referenceEdge = 0,
    incidentEdge = 0,
    incidentVertex = 0,
    flip = 0 { }

  // Constructs a new Features that is a copy of the given features.
  Features.copy(Features f) :
    referenceEdge = f.referenceEdge,
    incidentEdge = f.incidentEdge,
    incidentVertex = f.incidentVertex,
    flip = f.flip { }

  // Set this feature to be a copy of the given feature.
  void setFrom(Features f) {
    referenceEdge = f.referenceEdge;
    incidentEdge = f.incidentEdge;
    incidentVertex = f.incidentVertex;
    flip = f.flip;
  }

  /**
   * Returns true if this Features object is equal to the given object.
   */
  bool operator ==(other) =&gt;
    referenceEdge == other.referenceEdge &amp;&amp;
    incidentEdge == other.incidentEdge &amp;&amp;
    incidentVertex == other.incidentVertex &amp;&amp; flip == other.flip;

  /**
   * Returns a String representation of this Features.
   */
  String toString() {
    return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)";
  }

  /**
   * Sets all features to 0.
   */
  zero() {
    referenceEdge = 0;
    incidentEdge = 0;
    incidentVertex = 0;
    flip = 0;
  }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="Features">
<button class="show-code">Code</button>
new <strong>Features</strong>() <a class="anchor-link" href="#Features"
              title="Permalink to Features.Features">#</a></h4>
<div class="doc">
<p>Constructs a new features with zero values for all fields.</p>
<pre class="source">
Features() :
  referenceEdge = 0,
  incidentEdge = 0,
  incidentVertex = 0,
  flip = 0 { }
</pre>
</div>
</div>
<div class="method"><h4 id="Features.copy">
<button class="show-code">Code</button>
new <strong>Features.copy</strong>(<a href="../box2d_html/Features.html">Features</a> f) <a class="anchor-link" href="#Features.copy"
              title="Permalink to Features.Features.copy">#</a></h4>
<div class="doc">
<pre class="source">
Features.copy(Features f) :
  referenceEdge = f.referenceEdge,
  incidentEdge = f.incidentEdge,
  incidentVertex = f.incidentVertex,
  flip = f.flip { }
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field"><h4 id="flip">
<button class="show-code">Code</button>
int         <strong>flip</strong> <a class="anchor-link"
            href="#flip"
            title="Permalink to Features.flip">#</a>
        </h4>
        <div class="doc">
<p>A value of 1 indicates that the reference edge is on shape2.</p>
<pre class="source">
int flip;
</pre>
</div>
</div>
<div class="field"><h4 id="incidentEdge">
<button class="show-code">Code</button>
int         <strong>incidentEdge</strong> <a class="anchor-link"
            href="#incidentEdge"
            title="Permalink to Features.incidentEdge">#</a>
        </h4>
        <div class="doc">
<p>The edge most anti-parallel to the reference edge.</p>
<pre class="source">
int incidentEdge;
</pre>
</div>
</div>
<div class="field"><h4 id="incidentVertex">
<button class="show-code">Code</button>
int         <strong>incidentVertex</strong> <a class="anchor-link"
            href="#incidentVertex"
            title="Permalink to Features.incidentVertex">#</a>
        </h4>
        <div class="doc">
<p>The vertex (0 or 1) on the incident edge that was clipped.</p>
<pre class="source">
int incidentVertex;
</pre>
</div>
</div>
<div class="field"><h4 id="referenceEdge">
<button class="show-code">Code</button>
int         <strong>referenceEdge</strong> <a class="anchor-link"
            href="#referenceEdge"
            title="Permalink to Features.referenceEdge">#</a>
        </h4>
        <div class="doc">
<p>The edge that defines the outward contact normal.</p>
<pre class="source">
int referenceEdge;
</pre>
</div>
</div>
<div class="field inherited"><h4 id="runtimeType">
<button class="show-code">Code</button>
final Type         <strong>runtimeType</strong> <a class="anchor-link"
            href="#runtimeType"
            title="Permalink to Features.runtimeType">#</a>
        </h4>
        <div class="inherited-from">inherited from Object </div><div class="doc">
<p>A representation of the runtime type of the object.</p>
<pre class="source">
external Type get runtimeType;
</pre>
</div>
</div>
</div>
<div>
<h3>Operators</h3>
<div class="method"><h4 id="==">
<button class="show-code">Code</button>
bool <strong>operator ==</strong>(other) <a class="anchor-link" href="#=="
              title="Permalink to Features.operator ==">#</a></h4>
<div class="doc">
<p>Returns true if this Features object is equal to the given object.</p>
<pre class="source">
bool operator ==(other) =&gt;
  referenceEdge == other.referenceEdge &amp;&amp;
  incidentEdge == other.incidentEdge &amp;&amp;
  incidentVertex == other.incidentVertex &amp;&amp; flip == other.flip;
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="Features">
<button class="show-code">Code</button>
new <strong>Features</strong>() <a class="anchor-link" href="#Features"
              title="Permalink to Features.Features">#</a></h4>
<div class="doc">
<p>Constructs a new features with zero values for all fields.</p>
<pre class="source">
Features() :
  referenceEdge = 0,
  incidentEdge = 0,
  incidentVertex = 0,
  flip = 0 { }
</pre>
</div>
</div>
<div class="method"><h4 id="Features.copy">
<button class="show-code">Code</button>
new <strong>Features.copy</strong>(<a href="../box2d_html/Features.html">Features</a> f) <a class="anchor-link" href="#Features.copy"
              title="Permalink to Features.Features.copy">#</a></h4>
<div class="doc">
<pre class="source">
Features.copy(Features f) :
  referenceEdge = f.referenceEdge,
  incidentEdge = f.incidentEdge,
  incidentVertex = f.incidentVertex,
  flip = f.flip { }
</pre>
</div>
</div>
<div class="method inherited"><h4 id="hashCode">
<button class="show-code">Code</button>
int <strong>hashCode</strong>() <a class="anchor-link" href="#hashCode"
              title="Permalink to Features.hashCode">#</a></h4>
<div class="inherited-from">inherited from Object </div><div class="doc">
<p>Get a hash code for this object.</p>
<p>All objects have hash codes. Hash codes are guaranteed to be the
same for objects that are equal when compared using the equality
operator <code>==</code>. Other than that there are no guarantees about
the hash codes. They will not be consistent between runs and
there are no distribution guarantees.</p>
<p>If a subclass overrides <code>hashCode</code> it should override the
equality operator as well to maintain consistency.</p>
<pre class="source">
external int hashCode();
</pre>
</div>
</div>
<div class="method inherited"><h4 id="noSuchMethod">
<button class="show-code">Code</button>
<strong>noSuchMethod</strong>(String name, List args) <a class="anchor-link" href="#noSuchMethod"
              title="Permalink to Features.noSuchMethod">#</a></h4>
<div class="inherited-from">inherited from Object </div><div class="doc">
<p><code>noSuchMethod</code> is invoked when users invoke a non-existant method
on an object. The name of the method and the arguments of the
invocation are passed to <code>noSuchMethod</code>. If <code>noSuchMethod</code>
returns a value, that value becomes the result of the original
invocation.</p>
<p>The default behavior of <code>noSuchMethod</code> is to throw a
<code>noSuchMethodError</code>.</p>
<pre class="source">
external Dynamic noSuchMethod(String name, List args);
</pre>
</div>
</div>
<div class="method inherited"><h4 id="Object">
<button class="show-code">Code</button>
const <strong>Object</strong>() <a class="anchor-link" href="#Object"
              title="Permalink to Features.Object">#</a></h4>
<div class="inherited-from">inherited from Object </div><div class="doc">
<p>Creates a new <code>Object</code> instance.</p>
<p><code>Object</code> instances have no meaningful state, and are only useful
through their identity. An <code>Object</code> instance is equal to itself
only.</p>
<pre class="source">
const Object();
</pre>
</div>
</div>
<div class="method"><h4 id="setFrom">
<button class="show-code">Code</button>
void <strong>setFrom</strong>(<a href="../box2d_html/Features.html">Features</a> f) <a class="anchor-link" href="#setFrom"
              title="Permalink to Features.setFrom">#</a></h4>
<div class="doc">
<pre class="source">
void setFrom(Features f) {
  referenceEdge = f.referenceEdge;
  incidentEdge = f.incidentEdge;
  incidentVertex = f.incidentVertex;
  flip = f.flip;
}
</pre>
</div>
</div>
<div class="method"><h4 id="toString">
<button class="show-code">Code</button>
String <strong>toString</strong>() <a class="anchor-link" href="#toString"
              title="Permalink to Features.toString">#</a></h4>
<div class="doc">
<p>Returns a String representation of this Features.</p>
<pre class="source">
String toString() {
  return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)";
}
</pre>
</div>
</div>
<div class="method"><h4 id="zero">
<button class="show-code">Code</button>
<strong>zero</strong>() <a class="anchor-link" href="#zero"
              title="Permalink to Features.zero">#</a></h4>
<div class="doc">
<p>Sets all features to 0.</p>
<pre class="source">
zero() {
  referenceEdge = 0;
  incidentEdge = 0;
  incidentVertex = 0;
  flip = 0;
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
